<?php
$base_ = base_url();
$base_img = base_url() . "css/images/";


$jsontext = "{\"markers\":[";
foreach ($json as $key => $value) {
    $desc = "<img src='" . $base_img . $obr[$key] . "' height='15' style='vertical-align:top;'><br />" . $value['street'] . "<br />" . $value['city'] . "<br />" . $value['state'] . "<br />" . $value['seen'];
    $jsontext .= "{\"latitude\": " . (float)($value['latitude']) . ", \"longitude\": " . (float)($value['longitude']) . ", \"desc\": \"" . $desc . "\", \"desc_without_br\": \"" . $desc . "\", \"type_of_report\": \"" . $obr[$key] . "\"},";
}
$jsontext = substr_replace($jsontext, '', -1);
$jsontext .= "] }";

echo $jsontext;

?>